
from . import flutter
TextStyle = flutter.TextStyle
Container = flutter.Container
Center = flutter.Center
Text = flutter.Text
Stack = flutter.Stack
Positioned = flutter.Positioned
Transform = flutter.Transform
LinearGradient = flutter.LinearGradient
Colors = flutter.Colors
TextAlign = flutter.TextAlign
EdgeInsets = flutter.EdgeInsets
FontWeight = flutter.FontWeight
FontStyle = flutter.FontStyle
BoxShadow = flutter.BoxShadow
BoxShape = flutter.BoxShape
RichText = flutter.RichText
TextSpan = flutter.TextSpan
TextOverflow = flutter.TextOverflow
BorderRadius = flutter.BorderRadius
Offset = flutter.Offset
Scaffold = flutter.Scaffold
AppBar = flutter.AppBar
IconButton = flutter.IconButton
Icon = flutter.Icon
Icons = flutter.Icons
MaterialBanner = flutter.MaterialBanner
# CircleAvatar = flutter.CircleAvatar
FlatButton = flutter.FlatButton

# https://flutter.cn/docs/development/ui/widgets-intro
def 使用Material组件():
	sysu_info = '''中山大学由孙中山先生创办，有着一百多年办学传统。作为中国教育部直属高校，通过部省共建，中山大学已经成为一所国内一流、国际知名的现代综合性大学。现由广州校区、珠海校区、深圳校区三个校区、五个校园及十家附属医院组成。中山大学正在向世界一流大学迈进，努力成为全球学术重镇。
       中山大学具有人文社科和理医工多学科厚实基础，不断追求学术创新，以国际视野开放办学，现已形成了“综合性、研究型、开放式”的特色。学校坚持中国特色社会主义办学方向，坚持立德树人根本，以“面向世界科技前沿、面向经济主战场、面向国家重大需求、面向人民生命健康”为基本导向；树立了“三校区五校园”错位发展、合力支撑的发展思路。学校正在努力推进由外延式发展向内涵式发展转变，由常规发展向主动发展转变，由文理医优势向文理医工各具特色、融合发展转变。现在，中山大学正站在新的起点上，为稳居国内高校第一方阵，建设世界一流大学的目标努力奋斗！'''
	return Scaffold(
		# appBar=AppBar(
		# 	leading=IconButton(
		# 		icon=Icon(Icons.menu),
		# 		onPressed=None,
		# 	),
		# 	title=Text('Example title'),
		# 	actions=[
		# 		IconButton(
		# 			icon=Icon(Icons.search),
		# 			onPressed=None,
		# 		),
		# 	],
		# ),
		appBar=AppBar(
			leading=IconButton(
				icon=Icon(Icons.anchor),
				onPressed=None,
			),
			title=Text('1 selected'),
			actions=[
				IconButton(
					icon=Icon(Icons.file_upload),
					onPressed=None,
				),
				# Padding(
				# 	padding=EdgeInsets.symmetric(horizontal=16),
				# 	child=Icon(Icons.delete),
				# ),
				IconButton(
					icon=Icon(Icons.more_vert),
					onPressed=None,
				),
			],
			#
		),
		# body is the majority of the screen.
		# body=Container(
		# 	Center(
		# 		child=Text(sysu_info),
		# 	),
		# 	color=Colors.white,
		# ),
		body=Container(
			child=MaterialBanner(
				content=Text('Your password was updated on your other device. Please sign in again.'),
				leading=Icon(Icons.error_outline),
				actions=[
					FlatButton(
						child=Text('CONTINUE AS A GUEST'),
						onPressed=None,
					),
					FlatButton(
						child=Text('SIGN IN'),
						onPressed=None,
					),
				],
			),
		),
	)

def run_app():
	widget = 使用Material组件()
	javascript.document.body.appendChild(widget.render())
